<template>
<div id="app">
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="日期"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="地址">
      </el-table-column>
    </el-table>
    <el-button @click='test'>按钮</el-button>
</div>
  </template>

  <script>
    import axios from 'axios'
    export default {
      data() {
        return {
          tableData: []
        }
      },
      mounted:function(){
        this.getFileList();
      },
      created(){
      
      },
      methods:{
        getFileList:function() {
          this.axios.get('model')
          .then(res=>{
            console.log(res.data)
            this.tableData = res.data
          })
          .catch(err=>{
            console.log(err)
          })
        },
        test:function(){
          this.axios.get('hello')
          .then(response=>{
              console.log(response)
          })
          .catch(error=>{
            console.log(error)
          })
        },
      }
    }
  </script>